import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopGoodsCommentController } from '../../../controllers';
const uctoominishopGoodsCommentRouter = new Router();
const minishopGoodsCommentController = new uctooMinishopGoodsCommentController();

uctoominishopGoodsCommentRouter.post('/add', requireUser, minishopGoodsCommentController.add);
uctoominishopGoodsCommentRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_goods_comment'), minishopGoodsCommentController.edit);
uctoominishopGoodsCommentRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_goods_comment'), minishopGoodsCommentController.delete);

//For getting minishopGoodsComment with permission control
uctoominishopGoodsCommentRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_goods_comment'), minishopGoodsCommentController.getSingle);
uctoominishopGoodsCommentRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_goods_comment'), minishopGoodsCommentController.getMany);
uctoominishopGoodsCommentRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_goods_comment'), minishopGoodsCommentController.getMany);

//#endregion AutoCreateCode
export default uctoominishopGoodsCommentRouter;
